<template>
  <el-menu :default-active="this.$route.path" router style="width:200px;border:none;height:100%;background-color:rgb(50, 65, 87);">
    <el-menu-item index="/businessdetails" v-if="role === 'CHANNEL_ADMIN'">
      <i class="el-icon-document"></i>
      <span slot="title">业务明细</span>
    </el-menu-item>
    <el-menu-item index="/account" v-if="role === 'SUPER_ADMIN'">
      <i class="el-icon-menu"></i>
      <span slot="title">账号管理</span>
    </el-menu-item>
    <el-menu-item index="/user" v-if="role === 'SUPER_ADMIN'">
      <i class="el-icon-service"></i>
      <span slot="title">用户管理</span>
    </el-menu-item>
    <el-submenu index="/channel" v-if="role === 'SUPER_ADMIN' || role ==='STAFF_CHANNEL'  || role ==='MAIN_CHANNEL_PRODUCT'">
      <template slot="title"><i class="el-icon-sold-out"></i>渠道管理</template>
      <el-menu-item index="/channel/channelconfig">渠道配置</el-menu-item>
      <el-menu-item index="/channel/statistics">渠道统计</el-menu-item>
       <el-menu-item index="/channel/channelSettlement">渠道结算</el-menu-item>
      <!-- <el-menu-item v-if="role === 'MAIN_CHANNEL_PRODUCT' || role === 'SUPER_ADMIN' || role ==='STAFF_CHANNEL'" index="/channel/JPCheck">截屏监测</el-menu-item> -->
      <el-menu-item v-if="role === 'MAIN_CHANNEL_PRODUCT' || role === 'SUPER_ADMIN' || role ==='STAFF_CHANNEL'" index="/channel/IPCheck">IP监控</el-menu-item>
      <!-- <el-menu-item v-if="role === 'MAIN_CHANNEL_PRODUCT' || role === 'SUPER_ADMIN' || role ==='STAFF_CHANNEL'" index="/channel/personSave">七日留存</el-menu-item> -->
    </el-submenu>
    <el-submenu index="/product" v-if="role === 'SUPER_ADMIN' || role ==='STAFF_PRODUCT'  || role ==='MAIN_CHANNEL_PRODUCT' ">
      <template slot="title"><i class="el-icon-view"></i>产品管理</template>
      <el-menu-item v-if="role === 'MAIN_CHANNEL_PRODUCT' || role === 'SUPER_ADMIN' || role ==='STAFF_PRODUCT' "  index="/product/config">产品配置</el-menu-item>
      <el-menu-item v-if="role === 'SUPER_ADMIN' " index="/product/orders">产品排序</el-menu-item>
      <el-menu-item v-if="role === 'MAIN_CHANNEL_PRODUCT' || role === 'SUPER_ADMIN' || role ==='STAFF_PRODUCT'" index="/product/settlement">产品结算</el-menu-item>
       <el-menu-item v-if="role === 'SUPER_ADMIN' " index="/product/banners">banner推荐</el-menu-item>
    </el-submenu>
    <el-submenu index="/statistics" v-if="role === 'SUPER_ADMIN'">
      <template slot="title"><i class="el-icon-edit-outline"></i>数据统计</template>
      <el-menu-item index="/statistics/daichao">贷超转化</el-menu-item>
      <el-menu-item index="/statistics/position">位置转化</el-menu-item>
    </el-submenu>
    <el-submenu index="/finance" v-if="role === 'SUPER_ADMIN'  || role ==='MAIN_FINACE' ">
      <template slot="title"><i class="el-icon-goods"></i>财务管理</template>
      <!-- <el-menu-item index="/finance/financeFlow">财务流水</el-menu-item> -->
      <el-menu-item index="/finance/dailyStatistics">每日统计</el-menu-item>
    </el-submenu>
    <el-menu-item index="/complaint" v-if="role === 'SUPER_ADMIN'">
      <i class="el-icon-bell"></i>
      <span slot="title">投诉列表</span>
    </el-menu-item>
     <el-submenu index="/app" v-if="role === 'SUPER_ADMIN' ">
      <template slot="title"><i class="el-icon-setting"></i>APP管理</template>
      <el-menu-item index="/app/config">配置列表</el-menu-item>
      <!-- <el-menu-item index="/app/appVersion">app版本管理</el-menu-item> -->
    </el-submenu>
     <el-submenu index="/operation" v-if="role === 'SUPER_ADMIN'">
      <template slot="title"><i class="el-icon-sold-out"></i>运营管理</template>
      <el-menu-item index="/operation/miScore">米分管理</el-menu-item>
    </el-submenu>
  </el-menu>
</template>
<script>
  export default {
    data(){
      return {
        role: ''
      }
    },
    methods: {
    },
    created(){
      this.role = localStorage.getItem('SYSTEM_ROLE')
    }
  }
</script>
<style lang="scss" scoped>
</style>

